package cn.rocky.pandacodegen.common.config;

import cn.rocky.pandacodegen.common.utils.DataSourceManager;

import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;
import javax.servlet.annotation.WebListener;

@WebListener
public class RequestListener implements ServletRequestListener  {

    @Override
    public void requestDestroyed(ServletRequestEvent requestEvent) {
        DataSourceManager.closeConnection();
    }
}
